package com.wenwan.manage.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.wenwan.manage.service.ArticleExamineAdoptService;

import javax.annotation.Resource;

/**
 * 普通文章审核通过的。
 * 
 * @author Admin
 *
 */
@Controller
@RequestMapping(value = "/article/examine/adopt")
public class ArticleExamineAdoptController {

	@Autowired
	private ArticleExamineAdoptService articleExamineAdoptService;

	/**
	 * 审核通过的普通文章
	 * 
	 * @param articleExamineId
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/create", method = { RequestMethod.POST })
	public Map<String, Object> create(@RequestParam(required = true) String articleExamineId) {
		return articleExamineAdoptService.create(articleExamineId);
	}

	/**
	 * 删除审核通过的文章
	 * 
	 * @param articleExamineId
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/delete/by/article/examine/id", method = { RequestMethod.POST })
	public Map<String, Object> deleteByArticleExamineId(@RequestParam(required = true) String articleExamineId) {
		return articleExamineAdoptService.deleteByArticleExamineId(articleExamineId);
	}

}
